package com.example.qx.faxiana;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.example.qx.R;
import com.example.qx.adapter.faxianadapter;
import com.example.qx.lei.itemfaxian;

import java.util.ArrayList;
import java.util.List;

public class faxian extends Fragment {

    public faxian(){}
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup viewGroup, @Nullable Bundle savedInstanceState) {
        View v=inflater.inflate(R.layout.activity_faxian,viewGroup,false);
         List<itemfaxian> list=new ArrayList<>();
        list.add(new itemfaxian(1,"骑行圈"));
        list.add(new itemfaxian(2,"车队排行"));
        RecyclerView recyclerView=v.findViewById(R.id.faxianrecele);
        faxianadapter adapter=new faxianadapter(list,getActivity());
        recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
            recyclerView.setAdapter(adapter);
        return  v;

    }
}